version: '3.9'
services:
  learnjava1_db:
    image: postgres:13.3
    environment:
      - POSTGRES_PASSWORD=ocrvjava
      - POSTGRES_USER=ocrvjava
      - POSTGRES_DB=ocrvjava
    volumes:
      - db-volume:/var/lib/postgresql/data
    ports:
      - ${POSTGRES_PORT:-55311}:5432
    restart: unless-stopped
    deploy:
      resources:
        limits:
          cpus: '1'
          memory: 4GB    
volumes:
  db-volume:
          